using System;
using System.Collections.Generic;
using System.Text;
using Departure.Webservice.Methods;

namespace Departure.Webservice
{
    public class WebserviceWrapper
    {
        DepartureWebService ws = new DepartureWebService();
        
        public WebserviceWrapper()
        {
            ws.Url = "http://notexisting";
        }

        public void setURL(string URL)
        {
            ws.Url = URL;
        }

        public List<string> FindStation(string DeviceID, string Name)
        {
            return new List<string>(ws.FindStation(DeviceID, Name));
        }

        public void BeginFindStation(string DeviceID, string Name, AsyncCallback Callback, Object State)
        {
            ws.BeginFindStation(DeviceID, Name, Callback, State);
        }

        public List<string> EndFindStation(IAsyncResult AsyncResult)
        {
            return new List<string>(ws.EndFindStation(AsyncResult));
        }

        public string GetDepartures(string DeviceID, Webservice.Methods.GetDeparturesInput Input)
        {
            return ws.GetDepartures(DeviceID, Input);
        }

        public void BeginGetDepartures(string DeviceID, Webservice.Methods.GetDeparturesInput Input, AsyncCallback Callback, Object State)
        {
            ws.BeginGetDepartures(DeviceID, Input, Callback, State);
        }

        public string EndGetDepartures(IAsyncResult AsyncResult)
        {
            return ws.EndGetDepartures(AsyncResult);
        }
    }
}
